/***************************************************************************
 *   Copyright (C) 2003-2008 by                                            *
 *   Alberto Cuoci		                                                   *
 *   alberto.cuoci@polimi.it                                               *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#include "symbolickinetics/sandiego_avio/OpenSMOKE_SymbolicKinetics_SanDiego_AVIO.h"

void OpenSMOKE_SymbolicKinetics_SanDiego_AVIO::giveReactionRates(double cTot, BzzVector &c, BzzVector &R) 
{

	// ============================================================ 
	// ===== CORRECTION COEFFICIENTS FOR THIRD BODY REACTIONS ===== 
	// ============================================================ 
	coeffM1 =	   cTot;
	coeffM2 =	   cTot;
	coeffM7 =	   c[3]*1.5+c[4]*1.1E1+c[5]*9.0E-1+c[6]*2.8+cTot;
	coeffM8 =	   c[3]*1.5+c[4]*1.1E1+c[5]*9.0E-1+c[6]*2.8+cTot;
	coeffM9 =	   c[3]*1.5+c[4]*1.1E1+c[5]*9.0E-1+c[6]*2.8+cTot;
	coeffM10 =	   c[3]*1.5+c[4]*1.1E1+c[5]*9.0E-1+c[6]*2.8+cTot;
	coeffM11 =	   c[3]*1.5+c[4]*1.1E1+c[5]*9.0E-1+c[6]*2.8+cTot;
	coeffM12 =	   c[15]*5.0E-1+c[3]*1.5+c[4]*1.5E1+c[5]*2.0E-1+c[6]*1.4+cTot;
	coeffM18 =	   c[15]*2.0+c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM27 =	   c[3]*9.0E-1+c[4]*1.1E1+c[5]*1.5+c[6]*1.5+cTot;
	coeffM34 =	   c[15]*2.0+c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM55 =	   c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM56 =	   c[15]*2.0+c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM60 =	   c[3]*1.4+c[4]*1.44E1+c[5]*8.0E-1+c[6]*2.6+cTot;
	coeffM78 =	   c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM83 =	   c[15]*2.0+c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM89 =	   c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM98 =	   c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM99 =	   c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM101 =	   c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM138 =	   c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM139 =	   c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM148 =	   c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM160 =	   c[17]*1.0+c[3]*1.0+c[4]*5.0+c[5]*5.0E-1+c[6]*1.0+cTot;
	coeffM177 =	   c[1]*5.0E-1+c[2]*5.0E-1+c[4]*1.76E1+cTot;
	coeffM182 =	   c[1]*5.0E-1+c[2]*5.0E-1+c[4]*1.76E1+cTot;
	coeffM203 =	   cTot;
	coeffM211 =	   c[1]*1.0+c[2]*1.0+c[3]*1.0+c[4]*9.0+cTot;
	coeffM217 =	   cTot;
	coeffM221 =	   cTot;


	// ============================================================ 
	// ===== CORRECTION COEFFICIENTS FOR FALL OFF REACTIONS ======= 
	// ============================================================ 
	CFO12 =	   coeffM12/((coeffM12*k12)/kFallOff12+1.0);
	CFO18 =	   coeffM18/((coeffM18*k18)/kFallOff18+1.0);
	CFO34 =	   coeffM34/((coeffM34*k34)/kFallOff34+1.0);
	CFO55 =	   coeffM55/((coeffM55*k55)/kFallOff55+1.0);
	CFO56 =	   coeffM56/((coeffM56*k56)/kFallOff56+1.0);
	CFO83 =	   coeffM83/((coeffM83*k83)/kFallOff83+1.0);
	CFO89 =	   coeffM89/((coeffM89*k89)/kFallOff89+1.0);
	CFO101 =	   coeffM101/((coeffM101*k101)/kFallOff101+1.0);
	CFO148 =	   coeffM148/((coeffM148*k148)/kFallOff148+1.0);
	CFO160 =	   coeffM160/((coeffM160*k160)/kFallOff160+1.0);
	CFO217 =	   coeffM217/((coeffM217*k217)/kFallOff217+1.0);


	lnPr12 =	   log((coeffM12*k12)/kFallOff12);
	lnPr18 =	   log((coeffM18*k18)/kFallOff18);
	lnPr34 =	   log((coeffM34*k34)/kFallOff34);
	lnPr55 =	   log((coeffM55*k55)/kFallOff55);
	lnPr56 =	   log((coeffM56*k56)/kFallOff56);
	lnPr83 =	   log((coeffM83*k83)/kFallOff83);
	lnPr89 =	   log((coeffM89*k89)/kFallOff89);
	lnPr101 =	   log((coeffM101*k101)/kFallOff101);
	lnPr148 =	   log((coeffM148*k148)/kFallOff148);


	wF12 =	pow(10.0, logFcent12/(1.0+BzzPow2((0.434294481903*lnPr12-0.40-0.67*logFcent12)/(0.806-0.0608012274665*lnPr12-1.1762*logFcent12)))); 
	wF18 =	pow(10.0, logFcent18/(1.0+BzzPow2((0.434294481903*lnPr18-0.40-0.67*logFcent18)/(0.806-0.0608012274665*lnPr18-1.1762*logFcent18)))); 
	wF34 =	pow(10.0, logFcent34/(1.0+BzzPow2((0.434294481903*lnPr34-0.40-0.67*logFcent34)/(0.806-0.0608012274665*lnPr34-1.1762*logFcent34)))); 
	wF55 =	pow(10.0, logFcent55/(1.0+BzzPow2((0.434294481903*lnPr55-0.40-0.67*logFcent55)/(0.806-0.0608012274665*lnPr55-1.1762*logFcent55)))); 
	wF56 =	pow(10.0, logFcent56/(1.0+BzzPow2((0.434294481903*lnPr56-0.40-0.67*logFcent56)/(0.806-0.0608012274665*lnPr56-1.1762*logFcent56)))); 
	wF83 =	pow(10.0, logFcent83/(1.0+BzzPow2((0.434294481903*lnPr83-0.40-0.67*logFcent83)/(0.806-0.0608012274665*lnPr83-1.1762*logFcent83)))); 
	wF89 =	pow(10.0, logFcent89/(1.0+BzzPow2((0.434294481903*lnPr89-0.40-0.67*logFcent89)/(0.806-0.0608012274665*lnPr89-1.1762*logFcent89)))); 
	wF101 =	pow(10.0, logFcent101/(1.0+BzzPow2((0.434294481903*lnPr101-0.40-0.67*logFcent101)/(0.806-0.0608012274665*lnPr101-1.1762*logFcent101)))); 
	wF148 =	pow(10.0, logFcent148/(1.0+BzzPow2((0.434294481903*lnPr148-0.40-0.67*logFcent148)/(0.806-0.0608012274665*lnPr148-1.1762*logFcent148)))); 
	wF160 =	1.00; 
	wF217 =	1.00; 


	coeffFallOff12 =	   CFO12*wF12;
	coeffFallOff18 =	   CFO18*wF18;
	coeffFallOff34 =	   CFO34*wF34;
	coeffFallOff55 =	   CFO55*wF55;
	coeffFallOff56 =	   CFO56*wF56;
	coeffFallOff83 =	   CFO83*wF83;
	coeffFallOff89 =	   CFO89*wF89;
	coeffFallOff101 =	   CFO101*wF101;
	coeffFallOff148 =	   CFO148*wF148;
	coeffFallOff160 =	   CFO160*wF160;
	coeffFallOff217 =	   CFO217*wF217;


	// ============================================================ 
	// ===== REACTION RATES FOR THIRD BODY REACTIONS (Flat) ======= 
	// ============================================================ 
	rFlat1 =	   k1*(c[1]-c[1]*uK1);
	rFlat2 =	   k2*(c[2]-c[2]*uK2);
	rFlat7 =	   -k7*(c[3]*uK7-c[11]*c[11]);
	rFlat8 =	   k8*(c[11]*c[12]-c[4]*uK8);
	rFlat9 =	   -k9*(c[2]*uK9-c[13]*c[13]);
	rFlat10 =	   k10*(c[11]*c[13]-c[12]*uK10);
	rFlat11 =	   k11*(c[12]*c[13]-c[14]*uK11);
	rFlat12 =	   k12*(c[11]*c[2]-c[14]*uK12);
	rFlat18 =	   -k18*(c[16]*uK18-c[12]*c[12]);
	rFlat27 =	   k27*(c[18]-c[11]*c[5]*uK27);
	rFlat34 =	   k34*(c[11]*c[18]-c[20]*uK34);
	rFlat55 =	   k55*(c[11]*c[19]-c[17]*uK55);
	rFlat56 =	   -k56*(c[15]*uK56-c[19]*c[19]);
	rFlat60 =	   k60*(c[22]-c[21]*uK60);
	rFlat78 =	   k78*(c[24]-c[11]*c[20]*uK78);
	rFlat83 =	   k83*(c[15]-c[11]*c[25]*uK83);
	rFlat89 =	   k89*(c[25]-c[11]*c[23]*uK89);
	rFlat98 =	   k98*(c[23]-c[11]*c[7]*uK98);
	rFlat99 =	   k99*(c[23]-c[27]*c[3]*uK99);
	rFlat101 =	   k101*(c[7]-c[11]*c[27]*uK101);
	rFlat138 =	   k138*(c[31]-c[11]*c[20]*uK138);
	rFlat139 =	   k139*(c[24]-c[31]*uK139);
	rFlat148 =	   k148*(c[32]-c[12]*c[19]*uK148);
	rFlat160 =	   k160*(c[34]-c[19]*c[5]*uK160);
	rFlat177 =	   k177*(c[38]-c[36]*c[5]*uK177);
	rFlat182 =	   k182*(c[40]-c[39]*c[5]*uK182);
	rFlat203 =	   k203*(c[46]-c[11]*c[41]*uK203);
	rFlat211 =	   k211*(c[43]-c[11]*c[35]*uK211);
	rFlat217 =	   k217*(c[44]-c[1]*c[13]*uK217);
	rFlat221 =	   k221*(c[47]-c[13]*c[35]*uK221);


	// ============================================================ 
	// ===== REACTION RATES FOR EVERY REACTION ==================== 
	// ============================================================ 
	r1 =	   coeffM1*rFlat1;
	r2 =	   coeffM2*rFlat2;
	r3 =	   k3*(c[11]*c[2]-c[12]*c[13]*uK3);
	r4 =	   k4*(c[13]*c[3]-c[11]*c[12]*uK4);
	r5 =	   k5*(c[12]*c[3]-c[11]*c[4]*uK5);
	r6 =	   k6*(c[13]*c[4]-(c[12]*c[12])*uK6);
	r7 =	   coeffM7*rFlat7;
	r8 =	   coeffM8*rFlat8;
	r9 =	   coeffM9*rFlat9;
	r10 =	   coeffM10*rFlat10;
	r11 =	   coeffM11*rFlat11;
	r12 =	   coeffFallOff12*rFlat12;
	r13 =	   k13*(c[11]*c[14]-(c[12]*c[12])*uK13);
	r14 =	   k14*(c[11]*c[14]-c[2]*c[3]*uK14);
	r15 =	   k15*(c[11]*c[14]-c[13]*c[4]*uK15);
	r16 =	   k16*(c[13]*c[14]-c[12]*c[2]*uK16);
	r17 =	   k17*(c[12]*c[14]-c[2]*c[4]*uK17);
	r18 =	   coeffFallOff18*rFlat18;
	r19 =	   k19*(c[14]*c[14]-c[16]*c[2]*uK19);
	r20 =	   k20*(c[11]*c[16]-c[14]*c[3]*uK20);
	r21 =	   k21*(c[11]*c[16]-c[12]*c[4]*uK21);
	r22 =	   k22*(c[12]*c[16]-c[14]*c[4]*uK22);
	r23 =	   k23*(c[13]*c[16]-c[12]*c[14]*uK23);
	r24 =	   k24*(c[12]*c[5]-c[11]*c[6]*uK24);
	r25 =	   k25*(c[14]*c[5]-c[12]*c[6]*uK25);
	r26 =	   k26*(c[2]*c[5]-c[13]*c[6]*uK26);
	r27 =	   coeffM27*rFlat27;
	r28 =	   k28*(c[11]*c[18]-c[3]*c[5]*uK28);
	r29 =	   k29*(c[13]*c[18]-c[12]*c[5]*uK29);
	r30 =	   k30*(c[13]*c[18]-c[11]*c[6]*uK30);
	r31 =	   k31*(c[12]*c[18]-c[4]*c[5]*uK31);
	r32 =	   k32*(c[18]*c[2]-c[14]*c[5]*uK32);
	r33 =	   k33*(c[18]*c[19]-c[17]*c[5]*uK33);
	r34 =	   coeffFallOff34*rFlat34;
	r35 =	   k35*(c[11]*c[20]-c[18]*c[3]*uK35);
	r36 =	   k36*(c[13]*c[20]-c[12]*c[18]*uK36);
	r37 =	   k37*(c[12]*c[20]-c[18]*c[4]*uK37);
	r38 =	   k38*(c[2]*c[20]-c[14]*c[18]*uK38);
	r39 =	   k39*(c[14]*c[20]-c[16]*c[18]*uK39);
	r40 =	   k40*(c[11]*c[17]-c[19]*c[3]*uK40);
	r41 =	   k41*(c[12]*c[17]-c[19]*c[4]*uK41);
	r42 =	   k42*(c[13]*c[17]-c[12]*c[19]*uK42);
	r43 =	   k43*(c[17]*c[2]-c[14]*c[19]*uK43);
	r44 =	   k44*(c[14]*c[17]-c[16]*c[19]*uK44);
	r45 =	   k45*(c[11]*c[19]-c[21]*c[3]*uK45);
	r46 =	   k46*(c[11]*c[19]-c[22]*c[3]*uK46);
	r47 =	   k47*(c[12]*c[19]-c[22]*c[4]*uK47);
	r48 =	   k48*(c[13]*c[19]-c[11]*c[20]*uK48);
	r49 =	   k49*(c[19]*c[21]-c[11]*c[23]*uK49);
	r50 =	   k50*(c[14]*c[19]-c[12]*c[24]*uK50);
	r51 =	   k51*(c[19]*c[2]-c[12]*c[20]*uK51);
	r52 =	   k52*(c[19]*c[2]-c[13]*c[24]*uK52);
	r53 =	   k53*(c[19]*c[19]-c[23]*c[3]*uK53);
	r54 =	   k54*(c[19]*c[19]-c[11]*c[25]*uK54);
	r55 =	   coeffFallOff55*rFlat55;
	r56 =	   coeffFallOff56*rFlat56;
	r57 =	   k57*(c[12]*c[22]-c[11]*c[20]*uK57);
	r58 =	   k58*(c[2]*c[22]-c[11]*c[12]*c[5]*uK58);
	r59 =	   k59*(c[22]*c[6]-c[20]*c[5]*uK59);
	r60 =	   coeffM60*rFlat60;
	r61 =	   k61*(c[11]*c[21]-c[26]*c[3]*uK61);
	r62 =	   k62*(c[12]*c[21]-c[11]*c[20]*uK62);
	r63 =	   k63*(c[12]*c[21]-c[26]*c[4]*uK63);
	r64 =	   k64*(c[13]*c[21]-(c[11]*c[11])*c[5]*uK64);
	r65 =	   k65*(c[13]*c[21]-c[3]*c[5]*uK65);
	r66 =	   k66*(c[2]*c[21]-c[3]*c[6]*uK66);
	r67 =	   k67*(c[2]*c[21]-c[11]*c[12]*c[5]*uK67);
	r68 =	   k68*(c[21]*c[21]-(c[11]*c[11])*c[27]*uK68);
	r69 =	   k69*(c[13]*c[26]-c[11]*c[5]*uK69);
	r70 =	   k70*(c[2]*c[26]-c[13]*c[18]*uK70);
	r71 =	   k71*(c[26]*c[4]-c[11]*c[20]*uK71);
	r72 =	   k72*(c[26]*c[6]-c[18]*c[5]*uK72);
	r73 =	   k73*(c[11]*c[24]-c[20]*c[3]*uK73);
	r74 =	   k74*(c[11]*c[24]-c[22]*c[4]*uK74);
	r75 =	   k75*(c[12]*c[24]-c[20]*c[4]*uK75);
	r76 =	   k76*(c[13]*c[24]-c[12]*c[20]*uK76);
	r77 =	   k77*(c[2]*c[24]-c[14]*c[20]*uK77);
	r78 =	   coeffM78*rFlat78;
	r79 =	   k79*(c[11]*c[15]-c[25]*c[3]*uK79);
	r80 =	   k80*(c[13]*c[15]-c[12]*c[25]*uK80);
	r81 =	   k81*(c[12]*c[15]-c[25]*c[4]*uK81);
	r82 =	   k82*(c[15]*c[19]-c[17]*c[25]*uK82);
	r83 =	   coeffFallOff83*rFlat83;
	r84 =	   k84*(c[14]*c[15]-c[16]*c[25]*uK84);
	r85 =	   k85*(c[11]*c[25]-c[23]*c[3]*uK85);
	r86 =	   k86*(c[13]*c[25]-c[12]*c[23]*uK86);
	r87 =	   k87*(c[13]*c[25]-c[19]*c[20]*uK87);
	r88 =	   k88*(c[2]*c[25]-c[14]*c[23]*uK88);
	r89 =	   coeffFallOff89*rFlat89;
	r90 =	   k90*(c[11]*c[23]-c[3]*c[7]*uK90);
	r91 =	   k91*(c[12]*c[23]-c[4]*c[7]*uK91);
	r92 =	   k92*(c[13]*c[23]-c[18]*c[19]*uK92);
	r93 =	   k93*(c[13]*c[23]-c[11]*c[8]*uK93);
	r94 =	   k94*(c[23]*c[23]-c[25]*c[7]*uK94);
	r95 =	   k95*(c[2]*c[23]-c[14]*c[7]*uK95);
	r96 =	   k96*(c[14]*c[23]-c[12]*c[9]*uK96);
	r97 =	   k97*(c[14]*c[9]-c[16]*c[19]*c[5]*uK97);
	r98 =	   coeffM98*rFlat98;
	r99 =	   coeffM99*rFlat99;
	r100 =	   k100*(c[11]*c[7]-c[27]*c[3]*uK100);
	r101 =	   coeffFallOff101*rFlat101;
	r102 =	   k102*(c[2]*c[7]-c[18]*c[20]*uK102);
	r103 =	   k103*(c[2]*c[7]-c[13]*c[8]*uK103);
	r104 =	   k104*(c[2]*c[7]-c[14]*c[27]*uK104);
	r105 =	   k105*(c[13]*c[27]-c[10]*c[11]*uK105);
	r106 =	   k106*(c[13]*c[27]-c[21]*c[5]*uK106);
	r107 =	   k107*(c[2]*c[27]-c[20]*c[5]*uK107);
	r108 =	   k108*(c[12]*c[27]-c[11]*c[28]*uK108);
	r109 =	   c[29]*k109;
	r110 =	   c[11]*c[29]*k110;
	r111 =	   c[12]*c[29]*k111;
	r112 =	   c[13]*c[29]*k112;
	r113 =	   c[14]*c[29]*k113;
	r114 =	   c[18]*c[29]*k114;
	r115 =	   c[19]*c[29]*k115;
	r116 =	   c[25]*c[29]*k116;
	r117 =	   c[29]*c[7]*k117;
	r118 =	   c[10]*c[29]*k118;
	r119 =	   k119*(c[12]*c[27]-c[30]*c[4]*uK119);
	r120 =	   k120*(c[11]*c[28]-c[19]*c[5]*uK120);
	r121 =	   k121*(c[13]*c[28]-c[21]*c[6]*uK121);
	r122 =	   k122*(c[13]*c[28]-c[10]*c[12]*uK122);
	r123 =	   k123*(c[19]*c[28]-c[25]*c[5]*uK123);
	r124 =	   k124*(c[10]*c[11]-c[22]*c[5]*uK124);
	r125 =	   k125*(c[10]*c[12]-c[11]*c[18]*c[5]*uK125);
	r126 =	   k126*(c[10]*c[13]-c[11]*(c[5]*c[5])*uK126);
	r127 =	   k127*(c[10]*c[2]-c[12]*(c[5]*c[5])*uK127);
	r128 =	   k128*(c[10]*c[2]-c[11]*c[5]*c[6]*uK128);
	r129 =	   k129*(c[12]*c[30]-c[10]*c[11]*uK129);
	r130 =	   k130*(c[13]*c[30]-c[26]*c[5]*uK130);
	r131 =	   k131*(c[2]*c[30]-c[10]*c[13]*uK131);
	r132 =	   k132*(c[2]*c[30]-c[26]*c[6]*uK132);
	r133 =	   k133*(c[2]*c[30]-c[18]*c[5]*uK133);
	r134 =	   k134*(c[11]*c[31]-c[20]*c[3]*uK134);
	r135 =	   k135*(c[11]*c[31]-c[12]*c[19]*uK135);
	r136 =	   k136*(c[12]*c[31]-c[20]*c[4]*uK136);
	r137 =	   k137*(c[2]*c[31]-c[14]*c[20]*uK137);
	r138 =	   coeffM138*rFlat138;
	r139 =	   coeffM139*rFlat139;
	r140 =	   k140*(c[12]*c[28]-c[31]*c[5]*uK140);
	r141 =	   k141*(c[12]*c[32]-c[31]*c[4]*uK141);
	r142 =	   k142*(c[12]*c[32]-c[24]*c[4]*uK142);
	r143 =	   k143*(c[11]*c[32]-c[3]*c[31]*uK143);
	r144 =	   k144*(c[11]*c[32]-c[24]*c[3]*uK144);
	r145 =	   k145*(c[13]*c[32]-c[12]*c[31]*uK145);
	r146 =	   k146*(c[14]*c[32]-c[16]*c[31]*uK146);
	r147 =	   k147*(c[2]*c[32]-c[14]*c[31]*uK147);
	r148 =	   coeffFallOff148*rFlat148;
	r149 =	   k149*(c[8]-c[11]*c[28]*uK149);
	r150 =	   k150*(c[11]*c[8]-c[18]*c[19]*uK150);
	r151 =	   k151*(c[11]*c[8]-c[28]*c[3]*uK151);
	r152 =	   k152*(c[13]*c[8]-c[18]*c[20]*uK152);
	r153 =	   k153*(c[12]*c[8]-c[28]*c[4]*uK153);
	r154 =	   k154*(c[2]*c[8]-c[12]*c[20]*c[5]*uK154);
	r155 =	   k155*(c[19]*c[8]-c[11]*c[25]*c[5]*uK155);
	r156 =	   k156*(c[14]*c[8]-c[12]*c[18]*c[20]*uK156);
	r157 =	   k157*(c[14]*c[8]-c[2]*c[33]*uK157);
	r158 =	   k158*(c[8]-c[19]*c[5]*uK158);
	r159 =	   k159*(c[33]-c[18]*c[19]*uK159);
	r160 =	   coeffFallOff160*rFlat160;
	r161 =	   k161*(c[12]*c[33]-c[34]*c[4]*uK161);
	r162 =	   k162*(c[12]*c[33]-c[4]*c[8]*uK162);
	r163 =	   k163*(c[13]*c[33]-c[12]*c[34]*uK163);
	r164 =	   k164*(c[13]*c[33]-c[12]*c[8]*uK164);
	r165 =	   k165*(c[11]*c[33]-c[3]*c[34]*uK165);
	r166 =	   k166*(c[11]*c[33]-c[3]*c[8]*uK166);
	r167 =	   k167*(c[19]*c[33]-c[17]*c[34]*uK167);
	r168 =	   k168*(c[19]*c[33]-c[17]*c[8]*uK168);
	r169 =	   k169*(c[14]*c[33]-c[16]*c[34]*uK169);
	r170 =	   k170*(c[14]*c[33]-c[16]*c[8]*uK170);
	r171 =	   k171*(c[2]*c[33]-c[14]*c[34]*uK171);
	r172 =	   k172*(c[1]*c[13]-c[35]*c[36]*uK172);
	r173 =	   k173*(c[2]*c[36]-c[13]*c[35]*uK173);
	r174 =	   k174*(c[12]*c[36]-c[11]*c[35]*uK174);
	r175 =	   k175*(c[1]*c[26]-c[36]*c[37]*uK175);
	r176 =	   k176*(c[13]*c[37]-c[11]*c[38]*uK176);
	r177 =	   coeffM177*rFlat177;
	r178 =	   k178*(c[11]*c[38]-c[39]*c[5]*uK178);
	r179 =	   k179*(c[13]*c[38]-c[35]*c[5]*uK179);
	r180 =	   k180*(c[3]*c[38]-c[11]*c[40]*uK180);
	r181 =	   k181*(c[10]*c[35]-c[40]*c[5]*uK181);
	r182 =	   coeffM182*rFlat182;
	r183 =	   k183*(c[11]*c[40]-c[41]*c[5]*uK183);
	r184 =	   k184*(c[13]*c[40]-c[12]*c[38]*uK184);
	r185 =	   k185*(c[13]*c[40]-c[39]*c[6]*uK185);
	r186 =	   k186*(c[12]*c[40]-c[38]*c[4]*uK186);
	r187 =	   k187*(c[3]*c[42]-c[11]*c[37]*uK187);
	r188 =	   k188*(c[4]*c[42]-c[12]*c[37]*uK188);
	r189 =	   k189*(c[12]*c[42]-c[11]*c[38]*uK189);
	r190 =	   k190*(c[2]*c[42]-c[13]*c[38]*uK190);
	r191 =	   k191*(c[11]*c[39]-c[3]*c[36]*uK191);
	r192 =	   k192*(c[13]*c[39]-c[11]*c[35]*uK192);
	r193 =	   k193*(c[12]*c[39]-c[11]*c[43]*uK193);
	r194 =	   k194*(c[12]*c[39]-c[36]*c[4]*uK194);
	r195 =	   k195*(c[2]*c[39]-c[13]*c[43]*uK195);
	r196 =	   k196*(c[35]*c[39]-c[11]*c[44]*uK196);
	r197 =	   k197*(c[35]*c[39]-c[1]*c[12]*uK197);
	r198 =	   k198*(c[11]*c[41]-c[3]*c[39]*uK198);
	r199 =	   k199*(c[13]*c[41]-c[11]*c[43]*uK199);
	r200 =	   k200*(c[12]*c[41]-c[39]*c[4]*uK200);
	r201 =	   k201*(c[35]*c[41]-c[1]*c[4]*uK201);
	r202 =	   k202*(c[35]*c[41]-c[12]*c[45]*uK202);
	r203 =	   coeffM203*rFlat203;
	r204 =	   k204*(c[11]*c[46]-c[3]*c[41]*uK204);
	r205 =	   k205*(c[13]*c[46]-c[12]*c[41]*uK205);
	r206 =	   k206*(c[12]*c[46]-c[4]*c[41]*uK206);
	r207 =	   k207*(c[45]-c[1]*c[11]*uK207);
	r208 =	   k208*(c[11]*c[45]-c[1]*c[3]*uK208);
	r209 =	   k209*(c[13]*c[45]-c[11]*c[44]*uK209);
	r210 =	   k210*(c[12]*c[45]-c[1]*c[4]*uK210);
	r211 =	   coeffM211*rFlat211;
	r212 =	   k212*(c[11]*c[43]-c[3]*c[35]*uK212);
	r213 =	   k213*(c[12]*c[43]-c[35]*c[4]*uK213);
	r214 =	   c[19]*c[35]*k214;
	r215 =	   k215*(c[21]*c[35]-c[11]*c[40]*uK215);
	r216 =	   k216*(c[26]*c[35]-c[13]*c[37]*uK216);
	r217 =	   coeffFallOff217*rFlat217;
	r218 =	   k218*(c[11]*c[44]-c[1]*c[12]*uK218);
	r219 =	   k219*(c[13]*c[44]-(c[35]*c[35])*uK219);
	r220 =	   k220*(c[12]*c[44]-c[1]*c[14]*uK220);
	r221 =	   coeffM221*rFlat221;
	r222 =	   k222*(c[14]*c[35]-c[12]*c[47]*uK222);
	r223 =	   k223*(c[11]*c[47]-c[12]*c[35]*uK223);
	r224 =	   k224*(c[13]*c[47]-c[2]*c[35]*uK224);


	// ============================================================ 
	// ===== REACTION RATES FOR EVERY SPECIES ===================== 
	// ============================================================ 
	R[1] =	   -r172-r175+r197+r201+r207+r208+r210+r217+r218+r220;
	R[2] =	   -r102-r103-r104-r107-r12-r127-r128-r131-r132-r133-r137+r14-r147-r154+r157+r16+r17-r171-r173+r19-r190-r195+r224-r26-r3-r32-r38-r43-r51-r52-r58-r66-r67-r70-r77-r88+r9-r95;
	R[3] =	   r100+r110+r134+r14+r143+r144+r151+r165+r166-r180-r187+r191+r198+r20+r204+r208+r212+r28+r35-r4+r40+r45+r46-r5+r53+r61+r65+r66+r7+r73+r79+r85+r90+r99;
	R[4] =	   r111+r119+r136+r141+r142+r15+r153+r161+r162+r17+r186-r188+r194+r200+r201+r206+r21+r210+r213+r214+r22+r31+r37+r41+r47+r5-r6+r63-r71+r74+r75+r8+r81+r91;
	R[5] =	   r106+r107+r120+r123+r124+r125+r126*2.0+r127*2.0+r128+r130+r133+r140+r154+r155+r158+r160+r177+r178+r179+r181+r182+r183-r24-r25-r26+r27+r28+r29+r31+r32+r33+r58+r59+r64+r65+r67+r69+r72+r97;
	R[6] =	   r121+r128+r132+r185+r24+r25+r26+r30-r59+r66-r72;
	R[7] =	   -r100-r101-r102-r103-r104-r117+r90+r91+r94+r95+r98;
	R[8] =	   r103-r149-r150-r151-r152-r153-r154-r155-r156-r157-r158+r162+r164+r166+r168+r170+r93;
	R[9] =	   r96-r97;
	R[10] =	   r105-r118+r122-r124-r125-r126-r127-r128+r129+r131-r181;
	R[11] =	   -r10-r100+r101+r105+r108-r110-r12-r120-r124+r125+r126+r128+r129-r13-r134-r135+r138-r14-r143-r144+r149-r15-r150-r151+r155-r165-r166+r174+r176-r178+r180-r183+r187+r189-r191+r192+r193+r196-r198+r199-r20+r203-r204+r207-r208+r209-r21+r211-r212+r215-r218-r223+r24+r27-r28-r3+r30-r34-r35+r4-r40-r45-r46+r48+r49+r5+r54-r55+r57+r58-r61+r62+r64*2.0+r67+r68*2.0+r69-r7*2.0+r71-r73-r74+r78-r79-r8+r83-r85+r89-r90+r93+r98;
	R[12] =	   r10-r108-r11-r111+r112-r119+r122-r125+r127-r129+r13*2.0+r135-r136-r140-r141-r142+r145+r148-r153+r154+r156+r16-r161-r162+r163+r164-r17-r174-r18*2.0+r184-r186+r188-r189-r193-r194+r197-r200+r202+r205-r206+r21-r210-r213+r218-r22-r220+r222+r223+r23-r24+r25+r29+r3-r31+r36-r37+r4-r41+r42-r47-r5+r50+r51-r57+r58+r6*2.0-r62-r63+r67-r75+r76-r8+r80-r81+r86-r91+r96;
	R[13] =	   -r10+r103-r105-r106-r11-r112-r121-r122-r126-r130+r131-r145+r15-r152-r16-r163-r164-r172+r173-r176-r179-r184-r185+r190-r192+r195-r199-r205-r209+r216+r217-r219+r221-r224-r23+r26-r29+r3-r30-r36-r4-r42-r48+r52-r6-r64-r65-r69+r70-r76-r80-r86-r87-r9*2.0-r92-r93;
	R[14] =	   r104+r11-r113+r12-r13+r137-r14-r146+r147-r15-r156-r157-r16-r169-r17-r170+r171-r19*2.0+r20+r22+r220-r222+r23-r25+r32+r38-r39+r43-r44-r50+r77-r84+r88+r95-r96-r97;
	R[15] =	   r116+r56-r79-r80-r81-r82-r83-r84;
	R[16] =	   r113+r146+r169+r170+r18+r19-r20-r21-r22-r23+r39+r44+r84+r97;
	R[17] =	   r115+r167+r168+r33-r40-r41-r42-r43-r44+r55+r82;
	R[18] =	   r102-r114+r125+r133+r150+r152+r156+r159-r27-r28-r29-r30-r31-r32-r33-r34+r35+r36+r37+r38+r39+r70+r72+r92;
	R[19] =	   r109+r110+r111+r112+r113+r114+r116+r117+r118+r120-r123+r135+r148+r150-r155+r158+r159+r160-r167-r168-r214-r33+r40+r41+r42+r43+r44-r45-r46-r47-r48-r49-r50-r51-r52-r53*2.0-r54*2.0-r55-r56*2.0-r82+r87+r92+r97;
	R[20] =	   r102+r107+r114+r134+r136+r137+r138+r152+r154+r156+r34-r35-r36-r37-r38-r39+r48+r51+r57+r59+r62+r71+r73+r75+r76+r77+r78+r87;
	R[21] =	   r106+r121-r215+r45-r49+r60-r61-r62-r63-r64-r65-r66-r67-r68*2.0;
	R[22] =	   r124+r46+r47-r57-r58-r59-r60+r74;
	R[23] =	   r109*2.0+r110*3.0+r111*3.0+r112*3.0+r113*3.0+r114*3.0+r115*3.0+r116*3.0+r117*4.0+r118*3.0+r49+r53+r85+r86+r88+r89-r90-r91-r92-r93-r94*2.0-r95-r96-r98-r99;
	R[24] =	   -r139+r142+r144+r50+r52-r73-r74-r75-r76-r77-r78;
	R[25] =	   r109-r116+r123+r155+r54+r79+r80+r81+r82+r83+r84-r85-r86-r87-r88-r89+r94;
	R[26] =	   r130+r132-r175-r216+r61+r63-r69-r70-r71-r72;
	R[27] =	   r100+r101+r104-r105-r106-r107-r108-r119+r68+r99;
	R[28] =	   r108+r118-r120-r121-r122-r123-r140+r149+r151+r153;
	R[29] =	   -r109-r110-r111-r112-r113-r114-r115-r116-r117-r118;
	R[30] =	   r119-r129-r130-r131-r132-r133;
	R[31] =	   -r134-r135-r136-r137-r138+r139+r140+r141+r143+r145+r146+r147;
	R[32] =	   -r141-r142-r143-r144-r145-r146-r147-r148;
	R[33] =	   r157-r159-r161-r162-r163-r164-r165-r166-r167-r168-r169-r170-r171;
	R[34] =	   -r160+r161+r163+r165+r167+r169+r171;
	R[35] =	   r172+r173+r174+r179-r181+r192-r196-r197-r201-r202+r211+r212+r213-r214-r215-r216+r219*2.0+r221-r222+r223+r224;
	R[36] =	   r172-r173-r174+r175+r177+r191+r194;
	R[37] =	   r175-r176+r187+r188+r214+r216;
	R[38] =	   r176-r177-r178-r179-r180+r184+r186+r189+r190;
	R[39] =	   r178+r182+r185-r191-r192-r193-r194-r195-r196-r197+r198+r200;
	R[40] =	   r180+r181-r182-r183-r184-r185-r186+r215;
	R[41] =	   r183-r198-r199-r200-r201-r202+r203+r204+r205+r206;
	R[42] =	   -r187-r188-r189-r190;
	R[43] =	   r193+r195+r199-r211-r212-r213;
	R[44] =	   r196+r209-r217-r218-r219-r220;
	R[45] =	   r202-r207-r208-r209-r210;
	R[46] =	   -r203-r204-r205-r206;
	R[47] =	   -r221+r222-r223-r224;

}
